<!--
 * @Author: your name
 * @Date: 2021-04-01 17:33:30
 * @LastEditTime: 2021-04-08 21:05:03
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \shop\training-group-5-warehouse\dianshang\src\components\Headers.vue
-->
<template>
  <div class="header-box">
    <!-- 头部自身有一个返回按钮 -->
    <svg-icon iconClass="back" @click="goCack" />

    <slot />
  </div>
</template>

<script>
export default {
  methods: {
    goCack() {
      console.log(this.$router.go(-1), "返回");
    },
  },
  props: {},
};
</script>

<style lang="scss" scoped>
@import "@css/style.scss";
.header-box {
  width: 100%;
  height: px2rem(38);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 px2rem(18);
  color: #333;
  background: #eee;
  b {
    font-size: px2rem(16);
  }
  .svg-icon {
    font-size: px2rem(18);
  }
}
</style>
